package com.thor.palmmall.rest.hdmall.media;

import java.util.List;

import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import org.apache.cxf.jaxrs.ext.multipart.Attachment;
import org.apache.cxf.jaxrs.ext.multipart.Multipart;

import com.thor.commons.exception.ThorServiceException;

/**
 * 
 * @author:liyang
 * 
 * @time:2017年7月25日 下午4:08:29
 */
@Path("/hdmall/media")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public interface MMediaService {

  @POST
  @Path("/upload")
  @Consumes({
      "multipart/form-data" })
  List<String> upload(@Multipart(value = "file") Attachment attachment) throws ThorServiceException;
  
  
  @POST
  @Path("/upload/list")
  @Consumes("multipart/form-data")
  List<String> uploadList(List<Attachment> attachments) throws ThorServiceException;
  

//  @GET
//  @Path("/download/{moduleName}/{num}/{fileName}")
//  public Response download(@PathParam("moduleName") String moduleName, @PathParam("num") String num,
//      @PathParam("fileName") String fileName) throws ThorServiceException;
}